using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using trainstorm.BaseClass;

namespace trainstorm.InstanceClass
{
	class MenuScreen : BaseScreen
	{
		private Button play;
		private Button option;
		private Button about;
		private Button exit;

		public MenuScreen() : base() { }
		public MenuScreen(Game1 game)
			: base(game)
		{
			List<Vector2> position = game.getInsManager().getMenuPos();
			List<Texture2D> images = game.getInsManager().getMenu();

			layers = new Texture2D[] { images[0], images[1] };
			layerPos = new Vector2[] { position[0], position[1] };
			layerVel = new Vector2[layers.Length];

			play = new Button(position[2], images[2], true, game.font, "Play this Game");
			option = new Button(position[3], images[3], true, game.font, "Settings and Appearance");
			about = new Button(position[4], images[4], true, game.font, "Men Behind the Code");
			exit = new Button(position[5], images[5], true, game.font, "Quit this Game");
		}
		public override void Draw(SpriteBatch batch)
		{
			base.Draw(batch);
			play.draw(batch);
			option.draw(batch);
			about.draw(batch);
			exit.draw(batch);
		}
		public override void Update(Game1 game, GameTime gameTime)
		{
			base.Update(game, gameTime);
			play.update(gameTime);
			option.update(gameTime);
			about.update(gameTime);
			exit.update(gameTime);

			if (play.isPressed())
			{
				game.setScreen(new GameScreen(game));
			}
			if (option.isPressed())
			{

			}
			if (about.isPressed())
			{

			}
			if (exit.isPressed())
			{
				game.Exit();
			}
		}
	}
}
